<xsl:stylesheet version="1.1"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:our="http://www.ouroboroswiki.com/ext">
  
  <xsl:include href="../images_tohtml_include.xsl"/>
  
  <xsl:output method="xml" indent="yes" />

  <xsl:param name="gBrowseColumns">5</xsl:param>
  <xsl:param name="gBrowseMaxWidth">150</xsl:param>
  <xsl:param name="gBrowseMaxHeight">150</xsl:param>
  <xsl:param name="CKEditorFuncNum"/>

  <xsl:template match="/">
    <xsl:apply-templates select="content/original/contentGroups" mode="images">
 	  <xsl:with-param name="columns" select="$gBrowseColumns"/>
    </xsl:apply-templates>
  </xsl:template>
  
  <xsl:template match="content" mode="image-content">
    <our:ckcallback repo="{../@name}" path="{@id}" callbackid="{$CKEditorFuncNum}">
      <our:image 
        id="image-{@id}-{../@name}"
      	repo="{$gBrowseMaxWidth}x{$gBrowseMaxHeight}.{../@name}" 
      	path="{@id}" 
      	mode="absoluteReplace" 
      	title="{@id}.{../@name}" 
      	alt="{@id}.{../@name}"/>
    </our:ckcallback>
  </xsl:template>
  
</xsl:stylesheet>